package com.dmcliver.expensemanager.controller;

import java.util.List;

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;

import com.dmcliver.expensemanager.datalayer.AccountuserDAO;
import com.dmcliver.expensemanager.entity.Accountuser;

@Name("listUsersBean")
@Scope(ScopeType.SESSION)
public class ListUsersBean {

	@In("accountuserDAO")
	private AccountuserDAO userDAO;
	
	private List<Accountuser> abusers;
	
	public List<Accountuser> getAbusers(){
		
		if(abusers == null)
			abusers = userDAO.findAll();
		return abusers;
	}
}
